Shader "Custom/Normal Mapping"
{
	Properties
	{
		_MainTex("Base(RGB)", 2D) = "white"{}

		_BumpTex("Bump", 2D) = "bump"{}
	}

	SubShader
	{
		Tags
		{
			"RenderType"="Opaque"
		}
		LOD 200

		CGPROGRAM
		#pragma surface surf Lambert

		sampler2D _MainTex;
		sampler2D _BumpTex;

		struct Input
		{
			float2 uv_MainTex;
			float2 uv_BumpTex;
		};

		void surf(Input IN, inout SurfaceOutput o)
		{
			half4 c = tex2D(_MainTex, IN.uv_MainTex);
			o.Normal = UnpackNormal(tex2D(_BumpTex, IN.uv_BumpTex));
			o.Albedo = c.rgb;
			o.Alpha = c.a;
		}

		ENDCG
	}

	FallBack "Diffuse"
}